<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <link rel="stylesheet" href="/aaa/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/aaa/layuiadmin/style/admin.css" media="all">
</head>
<body>

<div class="layui-card-body">
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-form layui-card-header layuiadmin-card-header-auto">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">手机号</label>
                        <div class="layui-input-block">
                            <input type="text" name="name" id="sa-telephone" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button id="social-searchbtn" class="layui-btn layuiadmin-btn-admin" lay-submit lay-filter="LAY-user-back-search">
                            <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <table class="layui-hide" id="socialapprovetbl" lay-filter="socialapprovetbl-filter"></table>
</div>

<script src="/aaa/layuiadmin/layui/layui.js"></script>
<script th:inline="none">
    layui.use('table', function(){
        var table = layui.table;
        var $ = layui.$;

        table.render({
            elem: '#socialapprovetbl'
            ,height: 312
            ,url: '/aaa/socialuserapprove/getAllSocialUser' //数据接口
            ,page: true //开启分页
            ,cols: [
                [
                    {field: 'telephone', title: '用户电话',align:'center'}
                    ,{field: 'name', title: '用户姓名', align:'center'}
                    ,{field: 'username', title: '昵称',align:'center'}
                    ,{field: 'idState', title: '是否认证',align:'center' ,sort:true,templet: function(d){
                        if(d.idState==0){
                            return '<span style="color: #c00;">否</span>'
                        }else{
                            return '<span style="color: green;">是</span>'
                        }
                    }
            }

                ]
            ]

        });


        $('#social-searchbtn').click(function () {
            table.reload('socialapprovetbl', {
                url: '/aaa/socialuserapprove/getAllSocialUser',
                where: {
                    telephone:$("#sa-telephone").val(),
                } //设定异步数据接口的额外参数
                //,height: 300
            });
        });
    });



</script>



</body>
</html>
